import request from '@/utils/request'

const url = '/project/mold-inventory'

// 查询模具盘点主表
export function listMoldInventory(query) {
  return request({
    url: url + '/list',
    method: 'get',
    params: query
  })
}

// 查询模具盘点子表
export function listMoldInventoryChild(query) {
  return request({
    url: url + '/child/list',
    method: 'get',
    params: query
  })
}

// 导出模具盘点主表
export function exportMoldInventory(query) {
  return request({
    url: url + '/export',
    method: 'get',
    params: query
  })
}

// 开始盘点
export function beginMoldInventory() {
  return request({
    url: url + '/beginInventory',
    method: 'post',
  })
}

// 结束盘点
export function endMoldInventory() {
  return request({
    url: url + '/endInventory',
    method: 'put',
  })
}

// 实盘操作
export function realTransaction(params) {
  return request({
    url: url + '/realTransaction',
    method: 'post',
    params: params
  })
}
